package com.joey.cloud.flowable.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.flowable.engine.repository.ProcessDefinition;

import java.io.Serializable;

@ApiModel(value="流程实例信息")
@Data
public class FlowDefinitionVo implements Serializable {
    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "流程定义id")
    private String definitionId;
    @ApiModelProperty(value = "流程定义key")
    private String definitionKey;
    @ApiModelProperty(value = "流程定义名称")
    private String definitionName;
    @ApiModelProperty(value = "流程描述")
    private String description;
    @ApiModelProperty(value = "部署id")
    private String deploymentId;
    @ApiModelProperty(value = "版本")
    private Integer version;

    public FlowDefinitionVo(){}
    public FlowDefinitionVo(ProcessDefinition item){
        this.definitionId = item.getId();
        this.definitionKey = item.getKey();
        this.definitionName = item.getName();
        this.description = item.getDescription();
        this.deploymentId = item.getDeploymentId();
        this.version = item.getVersion();
    }
}
